 

import { useI18n } from 'vue-i18n'
import type { IJsonItem } from '../types'

export function useResourceLimit(): IJsonItem[] {
  const { t } = useI18n()
  return [
    {
      type: 'input-number',
      field: 'cpuQuota',
      name: t('project.node.cpu_quota'),
      span: 12,
      slots: {
        suffix: () => '%'
      },
      props: { min: -1 }
    },
    {
      type: 'input-number',
      field: 'memoryMax',
      name: t('project.node.memory_max'),
      span: 12,
      slots: {
        suffix: () => t('project.node.mb')
      },
      props: { min: -1 }
    }
  ]
}
